package com.cloudm.technician.ui.modules.common.login

import com.cloudm.technician.ui.base.BasePresenter
import com.cloudm.technician.ui.base.BaseView

/**
 * 作者: wesley
 * 时间: 2017/12/14
 * 描述: 登录界面的协议接口
 */
interface LoginContract {


    interface View : BaseView {

        fun getPhoneNumber(): String?

        fun getPassword(): String?

        fun btnLoginEnabled()

        fun btnLoginNotEnabled()

        fun setIvClearPhoneVisible()

        fun setIvClearPhoneNotVisible()

        fun showInputPhoneNumberMsg()

        fun showPhoneNumberFormatMsg()

        fun showPasswordEmptyMsg()

        fun loginSuccess()

        fun loginFailure(errorMsg: String)

        fun showUserEmptyMsg()

        fun showLoginDialog()

        fun hideLoginDialog()
    }


    interface Presenter : BasePresenter {

        fun updateBtnStatus()

        fun updateIvClearPhoneStatus(flag: Int, s: CharSequence?)

        fun updateIvClearPhoneStatus(hasFocus: Boolean)

        fun login(mobile: String?, password: String?)
    }
}